Databases are widely used to organize data to facilitate operations such as retrieval of individual pieces of data, queries based on multiple pieces of data, and updates to keep data current, for example. Database design often involves creating a detailed data model of a database, in order to specify logical and physical design choices and physical storage parameters. A data model may be written by a database designer in a data definition language, which can then be used to create the database.
Some database designers follow a workflow which determines relationships between data elements in view of a database's purpose, and superimposes a logical structure on data based on those relationships. After deciding what kind of information the database will hold, the database designer manually divides information items into major subjects, such as Products, Employees, Teams, or other subjects, depending on the database's purpose. Each subject may be represented as a table. Each table contains columns representing information stored in the table. For instance, a Products table might include columns such as number-in-stock and price. The designer may assign each table a primary key to uniquely identify each row. For example, an Employee Number might be used as primary key in an Employees table. The designer also considers relationships between the data in different tables, and adds columns to current tables or creates new tables to clarify the relationships, as appropriate. The design can then be refined, until it is ready to be normalized if it was not previously normalized. Data normalization rules help structure tables so that the corresponding implementation will work as planned.